import { getToken, removeToken } from '@/utils/storage'

export default {
  namespaced: true,
  state: {
    token: getToken(),
  },
  getters: {},
  mutations: {
    GETUSER(state, data) {
      state.token = data
    },
    REMOVETOKEN(state) {
      removeToken()
      state.token = null
    },
  },
  actions: {
    removeToken(context) {
      context.commit('REMOVETOKEN')
    },
  },
  modules: {},
}
